//
//  ViewController.m
//  Target-Action模式
//
//  Created by apple on 15/9/11.
//  Copyright (c) 2015年 戴维营. All rights reserved.
//

#import "ViewController.h"
#import "CustomButton.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    CustomButton *btn = [[CustomButton alloc] initWithFrame:CGRectMake(0, 20, 100, 40)];
    
    btn.backgroundColor = [UIColor orangeColor];
    
    [btn addTarget:self action:@selector(didClicked:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:btn];
    
    
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didClicked:(CustomButton *)sender
{
    NSLog(@"%s",__PRETTY_FUNCTION__);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
